[DCN] Add tests for cinderBackups#3963
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 35m 00s |
| ansible-playbook | ||
| {{ playbook_dir }}/../hooks/playbooks/dz_storage_cinder_backups.yaml | ||
| -i {{ inventory_file }} | ||
| -e cifmw_openshift_namespace={{ cifmw_openshift_namespace | default('openstack') }} |
There was a problem hiding this comment.
The invocation passes cifmw_openshift_namespace but the target playbook reads cifmw_openstack_namespace; different variables.
3f97050 to
10b6657
Compare
| extra_args: | ||
| ANSIBLE_LOG_PATH: "{{ cifmw_basedir }}/logs/cinder_backups_test.log" | ||
| script: | | ||
| ansible-playbook -i {{ inventory_file }} {{ playbook_dir }}/../hooks/playbooks/cinder_backups.yaml |
There was a problem hiding this comment.
What does {{ playbook_dir }} return when this is run?
Are you sure the hooks directory is above it? ({{ playbook_dir }}/../hooks/)
There was a problem hiding this comment.
{{ playbook_dir }} should be returning absolute path of the directory containing the playbook that is currently being executed
There was a problem hiding this comment.
I agree, {{ playbook_dir }} looks fragile and not future proof.
I will update the path to more explicit {{ cifmw_repo }}/hooks/playbooks/cinder_backups.yaml
| # Not implemented in this example | ||
| cinderBackups: | ||
| {% for _ceph in _ceph_vars_list %} | ||
| {% if _ceph.cifmw_ceph_client_cluster != _az_to_scaledown %} |
There was a problem hiding this comment.
So you're deploying cinderBackup on two AZs so that you don't have to scale it down?
Is the test code running on the same two AZs.
I think that's OK. You could come back and scaling down cinder backup in a future patch.
There was a problem hiding this comment.
The template has a conditional check if _ceph.cifmw_ceph_client_cluster != _az_to_scaledown to determine which AZs are to be included in the generated cinderBackups configuration.
During the default deploy loop (without scaledown), _az_to_scaledown is set empty (roles/ci_dcn_site/defaults/main.yml:29), so all the AZs in _ceph_vars_list pass the check and are included in the cinderBackups rendered.
For the optional scaledown task, user provides cifmw_ci_dcn_site_scaledown_az, and _az_to_scaledown is set to this value (playbooks/dcn.yml:85), causing the template to exclude this specific AZ from rendered configuration for scaledown task, triggering controlplane update to remove the backup service of that AZ.
It would be good to test the backup creation and restoration post scaledown task. I believe you were suggesting the same. :)
| openstackclient | ||
| openstack volume show vol-az1-backup-az2-restore-az2 -f value -c availability_zone | ||
| register: vol_az1_backup_az2_restore_az2_zone | ||
| failed_when: "'az2' not in vol_az1_backup_az2_restore_az2_zone.stdout" No newline at end of file |
There was a problem hiding this comment.
Please fix this white space issue
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 30m 46s |
10b6657 to
e7bdb82
Compare
e7bdb82 to
3519b21
Compare
…s template spec.cinder.template.cinderBackup (singluar) in DCN DT is replaced with cinderBackups (plural) to deploy multiple cinder backups per edge sites Add cinderBackups block to roles/ci_dcn_site/templates/service-values.yaml.j2 to enable per-AZ Ceph backup configuration on the OpenStackControlPlane CR. The block iterates over all active Ceph AZs, skipping any scaled-down site as required. Set cinderBackup.replicas to 0 in service-values.yaml.j2 as cinderBackup is deprecated Invoke hooks/playbooks/cinder_backups.yaml playbook to validates the behaviour of cinderBackups in DCN scenario. The playbook tests different scenarios of cinder backup creation and restoring the backups across availability zones. Jira: OSPRH-28343 Signed-off-by: Gais Ameer <gameer@redhat.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
d563913 to
fba2cf3
Compare
spec.cinder.template.cinderBackup (singluar) in DCN DT is
replaced with cinderBackups (plural) to deploy multiple cinder backups per edge sites.
Invoking hooks/playbooks/cinder_backups.yaml playbook to validates the behaviour of cinderBackups in DCN scenario.
The playbook tests different scenarios of cinder backup creation
and restoring the backups across availability zones.
Jira: [OSPRH-28343]
Signed-off-by: Gais Ameer gameer@redhat.com